home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- PARADOX COMMON QUESTIONS AND ANSWERS
-
- DETOOL
-
- 1. Do you need to play TKMENU/SETUPDOWAIT for each image in a
- multi-table form?
-
- Yes and No. You do need to play SETUPDOWAIT for each
- image that will have user interaction under the control of
- DOWAIT(" ") and a DPA Set. SETUPDOWAIT creates a DPA Set
- for a given image and form. In multi-table forms, each
- embedded form is a separate image, as a far as Paradox and
- DOWAIT(" ") are concerned.
-
-
- 2. When moving from image to image in a DOWAIT(" ") session,
- how is the DPA Set for a given image activated?
-
- First, it will be helpful to note that only one DPA Set
- can be active in memory at any one time. There are two
- ways to activate a particular DPA Set. One method is to
- arrive in a table image through natural movement. Natural
- movement in this context means movement via a key defined
- as a regular key. Simply calling DOWAIT(" ") with a
- particular table image active would be natural movement to
- that table image. The second way to activate a DPA Set is
- by calling ARRIVETABLE() within your own code. This
- should be done when the key pressed by the user is not
- "regular" but instead evokes "special" processing via a
- special key procedure or other procedure such as arrival
- or departure procedures. It is always safe to issue an
- ARRIVETABLE() call.
-
-
- 3. I played TKMENU/SETUPDOWAIT and thereby created a DPA Set
- script. Is that enough to cause my procedure assignment
- to be active when needed?
-
- No, the DPA Set script has within it code that defines a
- procedure assignment set. The proc is named according to
- a specific convention as follows: the letters "TK",
- followed by the table's name, and then an underscore
- character "_", followed finally by the form number to be
- used. When no form is used, the underscore character is
- followed by the word "None." When either ARRIVETABLE() is
- called by you (the programmer) or regular movement brings
- DOWAIT(" ") to a new image, DOWAIT(" ") itself creates
- on-the-fly a call to a proc named TKTableName_#. If a
- proc by the appropriate name is not in RAM (the script had
- been played so as to load the proc into RAM), or the proc
- cannot be found within the AUTOLIB path, a script error
- will occur declaring that the necessary TKTableName_# proc
- is not defined.
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4. What are the common mistakes in writing an INITWAIT(...)
- call?
-
- More description can be found in the script DOW8DEMO.SC
- found in your TOOLKIT directory.
-
- INITWAIT(...) takes three parameters. The first parameter
- denotes the total number of workspace images that will be
- present during the execution of DOWAIT(" "). All embedded
- forms in a multi-table form count. Any other workspace
- images count. Table-Lookup tables do not count unless
- they are also on the workspace. Tables within SETPOPUP
- (if used) do not count unless left on the workspace.
-
- The second INITWAIT(...) parameter denotes the image
- numbers of the specific images to have user interaction
- performed on them under the control of DOWAIT(" ") and a
- DPA Set. A WAIT command could conceivably control
- processing of a workspace table so that the second
- INITWAIT(...) parameter need not be informed of that
- table's image number.
-
- NOTE: Numbering of images within a multi-table form are
- determined by chronological placement on the form, not as
- one might assume such as a clockwise, counterclockwise, or
- other schema.
-
- The third INITWAIT(...) parameter spells out the table
- names of DPA Set controlled images, and should correspond
- in order with parameter number 2 (above). Misspellings,
- spaces, or even the inclusion of a path in this parameter
- will cause a script error when DOWAIT(" ") tries to invoke
- a DPA Set. The error message usually says "TKTableName_#
- is not defined" and the culprit may be within this third
- parameter of INITWAIT(...).
-
-
- 5. Why do I have to press <F2> twice to end my edit session
- when using DOWAIT(" ")?
-
- You don't! Usually, <F2> is defined as an EXIT type of
- key within your DPA Set script. If this is the case,
- pressing <F2> will end, or EXIT from, the DOWAIT(" ")
- session. The "DO_IT!" process is not automatically
- invoked. Common processing would be as follows:
-
- ....
- Dowait(" ") ;F2 here would have been an EXIT
- ;from dowait.
- If retval="F2" then
- DO_IT!
- Endif
- ....
-
-
-
-
- - 2 -
-
-
-
-
-
-
-
-
- 6. Are there any cautions in using DOWAIT(" ")?
-
- Only in terms of your computer's memory constraints.
- Generally, you should be cautious about using DOWAIT(" ")
- if you have less than around 90K of MEMLEFT() once Paradox
- has been loaded. Efficient PAL programming is also
- important.
-
-
- 7. What causes the message "TKTableName_#" not defined?
-
- A procedure by the name of the current workspace image and
- form number is not in RAM memory, or is not found along
- the AUTOLIB path. A misspelling, or other naming problem
- could exist within the third parameter of your
- INITWAIT(...) call.
-
-
- 8. Why have I been getting the run error that a value xx is
- not in the range of yy to zz, etc.?
-
- Usually, this is caused by trying to reference an array
- element that does not exist. In the context of DOWAIT("
- "), this could be due to invoking the wrong DPA Set. Or,
- you may have modified a form to be used within DOWAIT(" ")
- and since then have not redone the DPA Set script by
- replaying SETUPDOWAIT.
-
-
- 9. What is a DPA Set?
-
- DPA Set stands for DOWAIT Procedure Assignment Set. This
- is the set of Arrival, Departure, and Special Procedures,
- and also the key definition you have declared through
- playing TKMENU/SETUPDOWAIT. This would be the equivalent
- of Paradox version 2.0's TOOLKIT/Field_Define and
- Key_Define scripts.
-
-
- 10. How do I keep my current image on the Canvas when I want
- to put up a message, or use an ACCEPT command?
-
- Issue ECHO NORMAL ECHO OFF followed by your commands.
- ECHO NORMAL writes the current workspace image to the
- Canvas. ECHO OFF keeps the image on the Canvas so you may
- write to it. A new procedure within the version 3.0
- manual is REFRESHCANVAS(), which performs similar a duty
- for use with the Runtime.
-
-
- 11. TKACCEPT is a vital, and often misunderstood TOOLKIT
- variable. How and when is it used?
-
-
-
-
-
- - 3 -
-
-
-
-
-
-
-
-
- TKACCEPT is a logical variable set to either True or
- False. The value of TKACCEPT determines whether or not
- the key pressed by the user (stored in TKCHAR) will be
- passed through to Paradox. For instance, a user presses
- the right-arrow key. You (the PAL programmer) have
- defined right-arrow as a "special" key, so that for all
- fields, except the form's last field, regular action
- should occur, but on the last field of a form you will do
- something special. For regular action to occur (right-
- arrow movement), make sure TKACCEPT=True. In other words,
- Accept the user keystroke by letting Paradox do what it
- would normally do. However, when on the form's last
- field, assign TKACCEPT to False assuring that normal
- right-arrow action will not occur following your special
- action. The default value of TKACCEPT is True.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 4 -
-
-
-